Skip to content

[automated] Merge branch 'release/8.0-rc2' => 'release/8.0' #50963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dotnet-maestro-bot
Copy link
Contributor

I detected changes in the release/8.0-rc2 branch which have not been merged yet to release/8.0. I'm a robot and am configured to help you automatically keep release/8.0 up to date, so I've opened this PR.

This PR merges commits made on release/8.0-rc2 by the following committers:

  • captainsafia
  • wtgodbe
  • BrennanConroy
  • halter73
  • MackinnonBuck

Instructions for merging from UI

This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.

merge button instructions

If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.

Instructions for merging via command line

Run these commands to merge this pull request from the command line.

git fetch
git checkout release/8.0-rc2
git pull --ff-only
git checkout release/8.0
git pull --ff-only
git merge --no-ff release/8.0-rc2

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet-maestro-bot/AspNetCore HEAD:merge/release/8.0-rc2-to-release/8.0
or if you are using SSH
git push [email protected]:dotnet-maestro-bot/AspNetCore HEAD:merge/release/8.0-rc2-to-release/8.0

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

Instructions for updating this pull request

Contributors to this repo have permission update this pull request by pushing to the branch 'merge/release/8.0-rc2-to-release/8.0'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.

git checkout -b merge/release/8.0-rc2-to-release/8.0 release/8.0
git pull https://github.com/dotnet-maestro-bot/AspNetCore merge/release/8.0-rc2-to-release/8.0
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet-maestro-bot/AspNetCore HEAD:merge/release/8.0-rc2-to-release/8.0
or if you are using SSH
git checkout -b merge/release/8.0-rc2-to-release/8.0 release/8.0
git pull [email protected]:dotnet-maestro-bot/AspNetCore merge/release/8.0-rc2-to-release/8.0
(make changes)
git commit -m "Updated PR with my changes"
git push [email protected]:dotnet-maestro-bot/AspNetCore HEAD:merge/release/8.0-rc2-to-release/8.0

Contact .NET Core Engineering if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/master/scripts/GitHubMergeBranches.ps1.

MackinnonBuck and others added 5 commits September 21, 2023 16:05
…ender mode (dotnet#50851)

# Make auto components prefer the existing render mode

Ensures that if interactive components exist on the page and they all use a single render mode, components with the "Auto" render mode will also use that render mode.

## Description

It's a common requirement for state to be shared between interactive root components. For example, the `<HeadOutlet>` component, which allows updating content in the HTML `<head>`, renders content specified by a `<HeadContent>` component, if it exists. However, this only works if the `<HeadOutlet>` and `<HeadContent>` components use the same interactive render mode.

The Auto render mode lets Blazor select a "best" render mode (either Server or WebAssembly) at runtime, primarily depending on whether Blazor WebAssembly resources are cached in the browser. However, previously it did this without taking into consideration the render mode used by existing components on the page.

For example, suppose a `<HeadOutlet>` with an Auto render mode gets added to the page before WebAssembly resources have been loaded and cached, so it uses Blazor Server. Later, a `<HeadContent>` component, also with an Auto render mode, gets added to the page. But at this point, WebAssembly resources have loaded completely, so the `<HeadContent>` component uses Blazor WebAssembly. In this example, the content in the `<head>` does not update, because the `<HeadOutlet>` and `<HeadContent>` use different render modes.

This PR updates the auto render mode decision making logic to the following:
* If WebAssembly components exist on the page, use WebAssembly
* Otherwise, if Server components exist on the page, use Server
* Otherwise, if WebAssembly resources are cached, use WebAssembly
* Otherwise, use Server

Fixes dotnet#50686

## Customer Impact

Medium/high. We've seen multiple reports of the existing behavior causing problems in customer apps, and there isn't a workaround.

## Regression?

- [ ] Yes
- [X] No

This behavior has existed since the Auto render mode was introduced in an earlier .NET 8 preview release.

## Risk

- [ ] High
- [ ] Medium
- [X] Low

This PR is a small change to the Auto mode logic. It's unlikely that customers were already relying on the existing behavior.

## Verification

- [X] Manual (required)
- [X] Automated

## Packaging changes reviewed?

- [ ] Yes
- [ ] No
- [X] N/A
# Add Identity Components to Blazor template

## Description

This adds the option to add Identity Razor Components (`*.razor` files) when using the Blazor project template. This supports the same feature set as the Identity Razor Pages (`*.cshtml` files). We've already done an accessibility pass over these newly added components and this PR includes all the fixes for Accessibility too. As with the Identity Razor Pages, this supports local authentication (with the option to configure external login providers) and Identity management using EF Core.

Fixes dotnet#48786

## Customer Impact

These Identity Razor Components have been a common request for years as noted above, because it allows Blazor developers to use Identity without needing to add Razor Pages infrastructure which would otherwise be unnecessary and doesn't integrate well with the rest of the app. For example, the Identity Razor Pages to a Blazor app would use a different layout that doesn't match the look and feel of the Razor Components that make up the rest of the app.

## Regression?

- [ ] Yes
- [x] No

## Risk

- [ ] High
- [ ] Medium
- [x] Low

These are template only changes that only affect the brand new Blazor project template. It should have no impact on the project template output unless you opt-in to the individual auth option (other than a [small fix](dotnet@5462e42) to make the `--empty` option produce compileable output with all `InteractivityPlatform` options.)

## Verification

- [x] Manual (required)
- [x] Automated

We're also adding new validation scenarios for vendors to validate periodically.

## Packaging changes reviewed?

- [ ] Yes
- [ ] No
- [x] N/A

----

- [x] Finish user management components for 2fa, external login, personal data, etc...
- [x] Add signout link
- [x] Verify RegisterOnPersisting gets invoked as expected with the changes from dotnet#50625
- [x] Render ShowRecoveryCodes.razor inline rather than via a redirect.
- [x] Add baseline tests
- [x] Fix BOMs
- [x] Validate the template in VS
… anti-forgery (dotnet#50864)

## Description

Avoid running routing eagerly in implicit middlewares to prevents the `EndpointFeature` from being set and causing unexpected reactions in other middlewares, like the static file middleware.

We also remove the implicit registration of the anti-forgery middleware to avoid unintended collisions with authentication in Blazor.

Fixes dotnet#50818, dotnet#50815, dotnet#50844

## Customer Impact

Without this change, the anti-forgery middleware in Blazor apps runs too early and is not able to examine authentication state in the application. Requiring the middleware to be registered explicitly ensures that the correct ordering is applied.

Without this change, users will run into difficult to resolve issues with building applications that include forms with Blazor web apps.

## Regression?

- [X] Yes
- [ ] No

This is a regression that was introduced to middleware routing in .NET 8 Preview 7.

## Risk

- [ ] High
- [X] Medium
- [ ] Low

**Medium risk** because:
- We are reverting a change that was originally applied to resolve dotnet#49654. This means that the original bug will impact users, specifically those who are calling `UseRouting` explicitly without calling `UseAuthentication` and `UseAuthorization` if they are not available. There is a workaround that we plan to document this behavior for users.
- Apps deployed in .NET 8 RC 1 will break because we no longer automatically enable the anti-forgery middleware. Users will receive an exception at startup notifying them of the code changes to make in order to get things working correctly.

## Verification

- [X] Manual (required)
- [X] Automated

## Packaging changes reviewed?

- [ ] Yes
- [ ] No
- [X] N/A
@dotnet-maestro-bot dotnet-maestro-bot force-pushed the merge/release/8.0-rc2-to-release/8.0 branch from 5f4b38e to 3dbfa81 Compare September 27, 2023 17:12
@ghost ghost added area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Type: Merge Forward ⏩ labels Sep 27, 2023
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approving branch merge.

@halter73 halter73 force-pushed the merge/release/8.0-rc2-to-release/8.0 branch from 11822d0 to 9a71712 Compare September 27, 2023 19:21
@wtgodbe wtgodbe merged commit 96da75d into dotnet:release/8.0 Sep 27, 2023
@ghost ghost added this to the 8.0.0 milestone Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Type: Merge Forward ⏩
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants